/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package me.yobol.datastructure.basic.list.linked.sll;
import me.yobol.datastructure.basic.list.Node;

/**
 *
 * @author Yobol
 */
public class SingleLinkedNode extends Node{
    private int key;
    private SingleLinkedNode next;
    
    public SingleLinkedNode(){
        this(0,null);
    }
    
    public SingleLinkedNode(int key){
        this(key,null);
    }
    
    public SingleLinkedNode(int key,SingleLinkedNode next){
        this.key = key;
        this.next = next;
    }

    @Override
    public int getKey() {
        return key;
    }

    @Override
    public void setKey(int key) {
        this.key = key;
    }

    public SingleLinkedNode getNext() {
        return next;
    }

    public void setNext(SingleLinkedNode next) {
        this.next = next;
    }
    
}
